import { savePropertyMetadata } from '@midwayjs/core'

export const PERMISSION_META_KEY = 'permission:value'

export function Permission(value: string): MethodDecorator {
  return (target, propertyKey, descriptor) => {
    savePropertyMetadata(PERMISSION_META_KEY, value, target, propertyKey)
  }
}
